﻿@inherits NFinal.View.RazorView<NFinalCompiler.Sql.Data.TableData>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace @NFinalCompiler.Sql.SqlDocument.nameSpace
{
    /// <summary>
    /// @Model.Name
    ///</summary>
    @if (Model.TableAttribute != null)
    {
        string.Format(Model.TableAttribute, Model.Name);
    }
    public class @Model.Name
    {
    @foreach (NFinalCompiler.Sql.Data.ColumnData column in Model.ColumnDataList)
    {
        if (string.IsNullOrEmpty(column.Description))
        {
            @:/// <summary>
            @:/// @column.Name
            @:/// </summary>
        }
        else
        {
            @:/// <summary>
            @:/// @column.Description
            @:///</summary>
        }
        if (column.IsKey)
        {
            @:@if (Model.KeyAttribute != null) { string.Format(Model.KeyAttribute, column.Name); }
            }
        if(!string.IsNullOrEmpty(Model.ColumnAttribute))
        {
            @:@if (Model.KeyAttribute != null) { string.Format(Model.ColumnAttribute, column.Name); }
            }
        @:public @column.TypeString @column.Name { get; set; }
    }
    }
}